﻿using System.Windows.Forms;
using Common.Tools;
using mshtml;
using Spider.Service;
using Spider.Spiders.Workers;
using QqWBSprider = Spider.Spiders.Workers.QqWBSprider;

namespace Spider.Spiders
{
    /// <summary>
    /// 母蜘蛛
    /// </summary>
    internal class SpiderMother
    {
      
        private static SpiderMother _spiderMother;
        private static readonly  object _syncBoot=new object();
        private SpiderMother()
        {
            
        }
        public static SpiderMother GetInstance()
        {
            if (_spiderMother == null)
            {
                lock (_syncBoot)
                {
                    if (_spiderMother == null)
                    {
                        _spiderMother = new SpiderMother();
                    }
                }
            }
            return _spiderMother;
        }
        /// <summary>
        /// 生产一个QQ蜘蛛
        /// </summary>
        /// <returns></returns>
        public Spider CreateQqSprider()
        {
            return new QqSprider();
        }
        /// <summary>
        /// 生产一个QQ微博蜘蛛
        /// </summary>
        /// <returns></returns>
        public Spider CreateQqWbSprider()
        {
            return new QqWBSprider();
        }
        /// <summary>
        /// 生产一个Ygdy8net蜘蛛
        /// </summary>
        /// <returns></returns>
        public Spider CreateYgdy8netSprider()
        {
            return new Ygdy8netSprider();
        }
    }
}
